home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / HJ03E.MOD < prev    next >
Encoding:
Text File  |  1993-02-07  |  7.1 KB  |  178 lines

  1. ┌───────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name:     Super Color Mod   Mod Author: Hackmaster 'J' 1@6101 WWIVnet │
  3. │                                                                           │
  4. │ Difficulty:   Easy              Date      : 29JAN93                       │
  5. │                                                                           │
  6. │ WWIV Version: 4.22              Filename  : HJ03E.MOD (or .ZIP)           │
  7. │                                                                           │
  8. │ Description:  To add the basic colors to WWIV without disturbing the 0-7  │
  9. │               colors. What it does is add CTRL-P B-P for the extra color  │
  10. │               in addition to the normal CTRL-P 0-7.                       │
  11. └───────────────────────────────────────────────────────────────────────────┘
  12. ---------------------------------------------------------------------------
  13. 16AUG91:  Super Color Mod V1.1 release to the public
  14. ---------------------------------------------------------------------------
  15. 07SEP91:  SCM Mod V1.2 Revised code for WWIV 4.20 to take into account
  16.            extra parameters in the makeansi function
  17. ---------------------------------------------------------------------------
  18. 15AUG92:  Revised code slightly and release new copy for WWIV 4.21A
  19. ---------------------------------------------------------------------------
  20. 24JAN93:  Revised mod due to addition of the ESM in 4.22
  21. ---------------------------------------------------------------------------
  22. 29JAN93:  Fixed bug that Capital letters didn't produce colors
  23. ---------------------------------------------------------------------------
  24.  
  25. On with the mod....
  26.  
  27. Legend  = is an original line
  28.         + is an added or changed line
  29.         - is a deleted line
  30.  
  31. ===========================================================================
  32. Make the following changes in COM.C
  33. ---------------------------------------------------------------------------
  34. Modify void outchr as follows...
  35. ---------------------------------------------------------------------------
  36.  
  37. =void outchr(char c)
  38. =/* This function outputs one character to the screen, and if output to the
  39. = * com port is enabled, the character is output there too.  ANSI graphics
  40. = * are also trapped here, and the ansi function is called to execute the
  41. = * ANSI codes
  42. = */
  43. ={
  44. =  int i, i1;
  45. =
  46. =  if (change_color) {
  47. =    change_color = 0;
  48. =    if ((c >= '0') && (c <= '7'))
  49. =      ansic(c - '0');
  50.     if ((c >= 'b') && (c <= 'p'))       /* MOD SCM add this line */
  51.       ansic((c - 'a')+10);              /* MOD SCM add this line */
  52.     if ((c >= 'B') && (c <= 'P'))       /* MOD SCM add this line */
  53.       ansic((c - 'A')+10);              /* MOD SCM add this line */
  54. =    return;
  55. =  }
  56. =  if (c == 3) {
  57.          .
  58.          .
  59.          .
  60. ---------------------------------------------------------------------------
  61. Farther down still in COM.C replace void ansic with this one....
  62. ---------------------------------------------------------------------------
  63.  
  64. /* MOD SCM */
  65. void ansic(int n)
  66. {
  67.   char c;
  68.  
  69.   if ((n>=0) && (n<8)) {
  70.     c = ((thisuser.sysstatus & sysstatus_color) ? thisuser.colors[n] :
  71.           thisuser.bwcolors[n]);
  72.     if (c == curatr)
  73.       return;
  74.     setc(c);
  75.     makeansi((thisuser.sysstatus & sysstatus_color) ? thisuser.colors[0] :
  76.           thisuser.bwcolors[0],endofline, 0);
  77.   }
  78.   if ((n>9) && (n<26)) {
  79.     n = n - 10;
  80.     c = ((thisuser.sysstatus & sysstatus_color) ? n : n );
  81.     if (c == curatr)
  82.       return;
  83.     setc(c);
  84.     makeansi((thisuser.sysstatus & sysstatus_color) ? n : n,endofline, 0);
  85.   }
  86. }
  87. /* END MODIFY */
  88. ==========================================================================
  89. Make the following changes in BBSUTL.C
  90. --------------------------------------------------------------------------
  91. Modify function void inli as follows
  92. --------------------------------------------------------------------------
  93.  
  94. =          case 16: /* Ctrl-P */
  95. =            if (cp<maxlen-1) {
  96. =              ch=getkey();
  97. =              if ((ch>='0') && (ch<='7')) {
  98. =                s[cp++]=3;
  99. =                s[cp++]=ch;
  100. =                ansic(ch-'0');
  101. =              }
  102.               if ((ch>='b') && (ch<='p')) {  /* MOD SCM add this line */
  103.                 s[cp++]=3;                   /* MOD SCM add this line */
  104.                 s[cp++]=ch;                  /* MOD SCM add this line */
  105.                 ansic((ch-'a')+10);          /* MOD SCM add this line */
  106.               }                              /* MOD SCM add this line */
  107.               if ((ch>='B') && (ch<='P')) {  /* MOD SCM add this line */
  108.                 s[cp++]=3;                   /* MOD SCM add this line */
  109.                 s[cp++]=ch;                  /* MOD SCM add this line */
  110.                 ansic((ch-'A')+10);          /* MOD SCM add this line */
  111.               }                              /* MOD SCM add this line */
  112. =            }
  113. =            break;
  114. =          case 9:  /* Tab */
  115. ===========================================================================
  116. Make the following changes in MSGBASE.C
  117. ---------------------------------------------------------------------------
  118. add this function void scm before function void inmsg
  119. ---------------------------------------------------------------------------
  120.  
  121. /* MOD Scm */
  122. void scm(void)
  123. {
  124.   pl("Ctrl-P 0 Ctrl-P 1 Ctrl-P 2 Ctrl-P 3 Ctrl-P 4 Ctrl-P 5 Ctrl-P 6 Ctrl-P 
  125. 7");
  126.   pl("Ctrl-P b Ctrl-P c Ctrl-P d Ctrl-P e Ctrl-P f Ctrl-P g Ctrl-P h Ctrl-P 
  127. i");
  128.   pl("Ctrl-P j Ctrl-P k Ctrl-P l Ctrl-P m Ctrl-P n Ctrl-P o Ctrl-P p");
  129. }
  130. /* END MODIFY */
  131.  
  132. ---------------------------------------------------------------------------
  133. Make the following changes to function void inmsg
  134. ---------------------------------------------------------------------------
  135.  
  136. =void inmsg(messagerec *m1, char *title, int *anony, int needtitle, char *aux, 
  137. int fsed)
  138. ={
  139.          .
  140.          .
  141.          .
  142. =        if (stricmp(s,"/HELP")==0) {
  143. =          savel=0;
  144. =          printmenu(2);
  145. =        }
  146. +        if (stricmp(s,"/CL")==0) {
  147. +          savel=0;
  148. +          scm();
  149. +        }
  150. =        if (stricmp(s,"/LI")==0) {
  151.          .
  152.          .
  153.          .
  154.  
  155. ---------------------------------------------------------------------------
  156. Optional: Edit String 628 as below to bring attention to the colors....
  157.  
  158. "Enter '/HELP' for help, or type '/CL' for extended color list."
  159.  
  160. ---------------------------------------------------------------------------
  161.  
  162. Thats it. You should now have all the available colors by press CTRL-P b-p as
  163. well as still having the original WWIV colors 0-7.  Remember before you
  164. compile type MAKE FCNS to add the extra function void scm to FCNS.H.
  165.  
  166. PS. This Mod works great with WWIVEdit V2.5 just edit the colors line in
  167. DEFAULT.DEF and LOCAL.DEF as below:
  168.  
  169. =TAG:           [N] Disable User Tag Lines (if 1)
  170. =BBSTAG:        [N] Disable BBS Tag (if 1)
  171. +COLORS:        [0-7,b-p,B-P] Legal Color Range (See CONFIG.DOC for format)
  172. =MCI:           [] Characters treated as MCI chars as per Merlin's Mod
  173.  
  174. Hackmaster 'J' 1@6101 WWIVnet
  175.  
  176.  
  177.  
  178.